<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>系统文档 通用后台管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://thought.ren/css/quill2.0.2.snow.css" rel="stylesheet">
    <link href="https://thought.ren/css/katex0.15.2.min.css" rel="stylesheet">
</head>
<body>
<div id="sys-doc-editor"></div>

<script src="https://thought.ren/js/jquery-3.7.1.min.js"></script>
<script src="https://thought.ren/js/quill2.0.2.js"></script>
<script src="https://thought.ren/js/katex0.15.2.min.js"></script>
<script>
    function getParameterByName(name, url) {
        if (!url) url = window.location.href;
        name = name.replace(/[\[\]]/g, '\\$&');
        var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
            results = regex.exec(url);
        if (!results) return null;
        if (!results[2]) return '';
        return decodeURIComponent(results[2].replace(/\+/g, ' '));
    }

    console.log(getParameterByName('i'))
    $.get('/api/sys/doc/open', {code: getParameterByName('i')}, ({data}) => {
        let quill = new Quill('#sys-doc-editor', {
            readOnly: true,
            modules: {
                toolbar: false
            },
            placeholder: '系统文档内容……',
            theme: 'snow'
        })

        quill.setContents(JSON.parse(data))
    })

</script>
</body>
</html>